package com.kingyun.gpsinspection.purificationservice.services.tdm.outerservice.impl;

import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.MessageImpartVo;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.MessageImpartService;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.OutMessageImpartService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by liyi on 2017/4/10.
 * 消息推送对外接口
 */
public class OutMessageImpartServiceImpl implements OutMessageImpartService {
    @Autowired
    public MessageImpartService messageImpartService;
    private Logger logger = LoggerFactory.getLogger(getClass());

    /**
     * 保存消息推送信息
     *
     * @param messageImpart 消息推送信息
     * @return
     */
    @Override
    public int saveMessageImpart(MessageImpartVo messageImpart) {
        int i = 0;

        try {
            i = messageImpartService.save(messageImpart);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }

        return i;
    }
}
